1. Field of Invention
The present invention relates to a resistance compensation circuit and the method thereof. More particularly, the present invention relates to a resistance compensation circuit and method thereof used in a memory controller.
2. Description of Related Art
In the process of making an integrated circuit, process variations may cause the integrated circuit to have incorrect resistance resulting in a resistance variation. The resistance variation of the integrated circuit makes the value of the current inaccurate during operation such that the circuit cannot work properly. For example, if an oscillator has a resistance variation during the process, the resonance frequency is inaccurate. To solve the problem, some compensation resistors and trimming pads are added to the conventional integrated circuit to compensate for the resistances in the case of resistance variation.
FIG. 1 shows a conventional integrated circuit, an oscillator 100 for example. As shown in FIG. 1, the band gap 101 provides reference voltage to the operation amplifier 103. The output of the operation amplifier 103 connects to an original resistor 105, and the resistance compensation circuit 115 is used to compensate for the resistance variation of the original resistor 105. The original resistor 105 and the compensation resistors 107a, 107b, and 107c are connected in series; the conducting wire 111a, 111b and 111c connect across the corresponding resistors individually; the trimming pads 109a, 109b and 109c are disposed on the corresponding conducting wires 111a, 111b and 111c individually.
If the original resistor 105 does have resistance variation so that resistance of the original resistor 105 is not the one required by the oscillator 100, the trimming pads 109a, 109b and 109c are used to select the compensation resistors to compensate for the resistance of the original resistor 105. For example, after the oscillator 100 has been manufactured, a test procedure measures all of the resistance after the process (including resistances of the resistors 105, 107a, 107b and 107c) to decide which resistor is needed. If we choose the compensation resistor 107a to compensate the resistance variation of the original resistor 105, trimming pad 109a is cut off and the trimming pad 109b, 109c are preserved such that the equivalent resistance will be the sum of the processed resistance of original resistor 105 and the processed resistance of the compensate resistor 107a. 
However, due to the large area (about 40×40 um2) required by the trimming pads 109a, 109b, and 109c of the resistance compensation circuit 115, compensation resistors cannot be added sufficiently under the area limitations, such that the equivalent resistance after compensation cannot be accurate enough. In addition, once the trimming pad has been cut off, the resonance frequency of the oscillator 100 cannot be changed again. Therefore, this kind of oscillator 100 cannot work with nonvolatile memories of different frequencies.
For the foregoing reasons, there is a need for a new resistance compensation circuit and method thereof to reduce the area required by the conventional resistance compensation circuit; there is also a need for a new resistance compensation circuits and methods thereof to make the equivalent resistance more accurate after compensation; there is also a need for a new frequency tuning method to improve the performance of the integrated circuit.